<template>
	<view class="page">
		<view class="carousel">
			<swiper 
				:indicator-dots="indicatorDots" 
				:autoplay="autoplay" 
				:interval="interval" 
				:duration="duration"
				:circular="circular"
				class="swiper1"
			>
				<swiper-item v-for="(item, index) in imgUrls" :key="index">
					<image :src="item" class="slide-image" mode="aspectFill"></image>
				</swiper-item>
			</swiper>
		</view>
		<view class="middle-title">
			<span class="iconfont icon-laba"></span>
			<text>重要通知！！！</text>
		</view>
		<view class="content">
			<view class="service-item">
				<img src="../../static/images/kuaidi.png" alt="" />
				<p>快递代取</p>
			</view>
			<view class="service-item">
				<img src="../../static/images/paotui.png" alt="" />
				<p>快递代取</p>
			</view>
			<view class="service-item">
				<img src="../../static/images/daiji.png" alt="" />
				<p>快递代取</p>
			</view>
			<view class="service-item">
				<img src="../../static/images/zujie.png" alt="" />
				<p>快递代取</p>
			</view>
			<view class="service-item">
				<img src="../../static/images/youxi.png" alt="" />
				<p>快递代取</p>
			</view>
			<view class="service-item">
				<img src="../../static/images/bangsong.png" alt="" />
				<p>快递代取</p>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrls: [
				        '/static/images/slide1.jpg',
				        '/static/images/slide2.jpg',
				        '/static/images/slide3.jpg'
				      ],
				      indicatorDots: true,
				      autoplay: true,
				      interval: 5000,
				      duration: 1000,
				      circular: true
			}	
		},
		onLoad() {

		},
		methods: {

		},
		created() {
		}
	}
</script>

<style lang="scss" scoped>
.page{
	width: 100%;
	height: 100vh;
	background-color: #F2F2F2;
	.middle-title{
		width: 90%;
		height: 80rpx;
		line-height: 80rpx;
		background-color: white;
		margin: 0 auto;
		border-radius: 30rpx;
		margin-top: 20rpx;
		margin-bottom: 50rpx;
		padding-left: 20rpx;
	}
	.content{
		width: 100%;
		height: 590rpx;
		// background-color: pink;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 50rpx;
		padding: 10rpx;
		.service-item{
			background-color: white;
			border-radius: 8px;
			padding: 10rpx;
			margin: 5rpx;
			width: calc(33.333% - 2rem);
			height: 150rpx;
			box-sizing: border-box;
			text-align: center;
			color: #639CC3;
			//设置盒子阴影
			box-shadow: 0 0 10rpx rgba(232, 232, 232, 0.1);
			img {
				width: 130rpx;
				height: 130rpx;
				background-color: #6A95C6;
			  margin-bottom: 0rem;
			  // 让图片自己往上走
			  margin-top: -50rpx;
			  border-radius: 50%;
			}
			p {
			  margin: 0;
			  font-size: 1rem;
			}
		}
	}
	.carousel{
		width: 100%;
		height: 400rpx;
		background-color: pink;
		.swiper1{
			height: 100%;
		}
		.slide-image{
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}
}
</style>
